1. Field
The following description relates to a method and apparatus for performing path rendering.
2. Description of Related Art
A study has recently been conducted on a method of improving acceleration performance of a graphics processing unit (GPU) when vector graphics or path rendering is performed. A hardware structure of a GPU is designed on an assumption that all pieces of input data are configured as a triangle in order to accelerate three-dimensional graphics. However, for path rendering, input data is configured, not with triangles, but a combination of a command and a vertex. Accordingly, it is difficult to improve acceleration performance of a GPU when performing path rendering.
For example, in order to draw a curve by using a GPU, a control processing unit (CPU) primarily divides the curve into a plurality of triangles by using a start point of the curve as a center, and instructs the GPU to reconfigure the divided triangles as a curved line. Accordingly, a lot of time is consumed by the CPU when dividing the curve into a plurality of triangles. Also, the CPU communicates with the GPU whenever calling multiple OpenGL APIs, and a lot of changes occur in the state of the GPU.
In this connection, a stencil-based path rendering method using a stencil buffer in the GPU has been suggested. However, according to the stencil-based path rendering method, data input to/output from memory is excessively generated during rendering, and thus the stencil buffer is incapable of parallel processing. Thus, the improvement in acceleration performance of the GPU is limited.